home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 1989.ZIP / README < prev   
Text File  |  1990-05-19  |  45KB  |  918 lines

  1.  
  2.           For immediate release                             May 19, 1990
  3.           ---------------------
  4.            
  5.  
  6.                                - QQuery Version 2.10D -
  7.  
  8.  
  9.                                   QQuery for FoxPro!
  10.  
  11.           Elaborate query management system for FoxBASE+ and now for
  12.           FoxPro!  Helps user create, store, and replay queries to use with
  13.           your reports and/or processes.  Includes context sensitive on-
  14.           line help system.  Registered users ($10) receive source code and
  15.           unlimited runtime rights.  
  16.  
  17.           Version 2.10D adds modifiable related file field names pop up
  18.           menus in both the FoxBASE+ and FoxPro versions.  QQuery for
  19.           FoxPro is comparable in appearance, navigation, and function with
  20.           QQuery for FoxBASE+ while taking advantage of FoxPro's 25 work
  21.           areas and 254 field data files.
  22.  
  23.           New features in version 2.10D:
  24.  
  25.           1.   Pop up menus are available at the touch of the left and
  26.                right arrow keys for the field names and sample data of ANY
  27.                OR ALL OTHER OPEN WORK AREAS.
  28.  
  29.           2.   User definable exclusion of Help, Error and any other files
  30.                you specify from the field names pop up menus.
  31.  
  32.           3.   For greater control over the contents of field names pop up
  33.                menus, a new utility program is supplied, QQDMEDIT.PRG, a
  34.                program for modifying any existing QQuery QDM memory file.
  35.  
  36.           4.   The left and right arrow keys now are used to either exit
  37.                pop up menus with the highlighted choice OR to scan parallel
  38.                pop up menus.
  39.  
  40.           5.   The same source code provided when you register may be used
  41.                to compile QQuery to run under either FoxBASE+ or FoxPro
  42.                versions 1.01 or later.
  43.  
  44.  
  45.  
  46.           Carlos Berguido
  47.           1722 Capella Court
  48.           Petaluma, CA 94954
  49.           (707) 762-9067
  50.  
  51.  
  52.           For immediate release                             March 23, 1990
  53.           ---------------------
  54.            
  55.                                - QQuery Version 2.10C -
  56.  
  57.           By popular demand, the following policies are established for
  58.           QQuery, the logical expression builder and query manager for IBM
  59.           FoxBASE+.  QQuery is a 3rd party shareware product available for
  60.           downloading in the library of the Fox Software forum on
  61.           Compuserve, GO FOXFORUM.
  62.            
  63.                1.   UNLIMITED RUNTIME.  A single registration fee licenses
  64.                     you to include the QQuery modules in any application
  65.                     you develop and to distribute any number of copies of
  66.                     these applications with no royalties whatsoever.
  67.            
  68.                2.   The registration fee has been reduced to $10 effective
  69.                     immediately.  You will receive one 5 1/4" diskette
  70.                     (360k format) containing the QQuery program for
  71.                     FoxBASE+, a README file, and source code.
  72.            
  73.                3.   SOURCE CODE optimized for FoxBASE+ supplied on disk
  74.                     when you register.  As a registered user, you are
  75.                     licensed to:
  76.  
  77.                     a.   Modify the code as desired to optimize QQuery for
  78.                          your applications.
  79.  
  80.                     b.   Modify and re-compile all or part of QQuery as
  81.                          desired to optimize QQuery to run under FoxPro
  82.                          and/or other platforms.
  83.  
  84.                     c.   Provide QQuery source code to your clients that
  85.                          require source code, as long as you provide a
  86.                          notice that use of QQuery other than from within
  87.                          your application requires registration.
  88.            
  89.                4.   Unconditional 30 day money back guarantee.
  90.            
  91.  
  92.           Release 2.10C does not change or add any QQuery features.  The
  93.           purpose of this release is to incorporate the new policies in the
  94.           source code and screen notices only.
  95.  
  96.  
  97.  
  98.           Carlos Berguido
  99.           1722 Capella Court
  100.           Petaluma, CA 94954
  101.           (707) 762-9067
  102.  
  103.  
  104.  
  105.           05/19/90                Q Q U E R Y (tm)                   Page i
  106.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.                                 - TABLE OF CONTENTS -
  115.  
  116.  
  117.  
  118.           QUERY MANAGEMENT FOR FoxBASE+ and FoxPro . . . . . . . . . .    1
  119.  
  120.           REGISTRATION NOTICE  . . . . . . . . . . . . . . . . . . . .    1
  121.  
  122.           FEATURES AND BENEFITS  . . . . . . . . . . . . . . . . . . .    2
  123.  
  124.           CAUTION: MULTI-USER  . . . . . . . . . . . . . . . . . . . .    4
  125.  
  126.           ONE OPEN DATA FILE WORK AREA NEEDED  . . . . . . . . . . . .    4
  127.  
  128.           QQUERY FILE DESCRIPTIONS . . . . . . . . . . . . . . . . . .    4
  129.  
  130.           HOW QQUERY CREATES AND USES FILES  . . . . . . . . . . . . .    5
  131.                QDB & QDX FILES: QUERY DATA FILES AND INDEXES . . . . .    5
  132.                QDM FILES: FIELD NAME POP UP MENUS  . . . . . . . . . .    6
  133.                MULTIPLE WORK AREA FIELD NAME POP UP MENUS  . . . . . .    6
  134.                EXCLUDING FILES FROM FIELD NAMES POP UP MENUS . . . . .    7
  135.  
  136.           CUSTOM FIELD NAMES POP UP MENUS  . . . . . . . . . . . . . .    8
  137.  
  138.           MEMORY REQUIREMENTS  . . . . . . . . . . . . . . . . . . . .    9
  139.  
  140.           QQUERY MEMORY VARIABLES  . . . . . . . . . . . . . . . . . .   10
  141.  
  142.           CHANGING SCREEN COLORS . . . . . . . . . . . . . . . . . . .   11
  143.  
  144.           PROCEDURE FILES  . . . . . . . . . . . . . . . . . . . . . .   13
  145.  
  146.           READ ONLY ACCESS . . . . . . . . . . . . . . . . . . . . . .   14
  147.  
  148.           NOTICE REGARDING QQUERY SOURCE CODE  . . . . . . . . . . . .   15
  149.  
  150.           INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . .   16
  151.  
  152.           05/19/90                Q Q U E R Y (tm)                   Page 1
  153.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  154.  
  155.  
  156.                       QUERY MANAGEMENT FOR FoxBASE+ and FoxPro
  157.  
  158.           QQuery was developed using the database language and extensions
  159.           known as FoxBASE+ and FoxPro from FOX SOFTWARE, INC. of
  160.           Perrysburg, Ohio.  QQuery was created by a 3rd party, independent
  161.           developer who is not affiliated with FOX SOFTWARE, INC.  FOX
  162.           SOFTWARE, INC. is not responsible for products that are developed
  163.           using their language products.  If you need help or information
  164.           regarding QQuery, please direct your inquiry to the author and
  165.           copyright holder of QQuery whose name appears below.
  166.  
  167.                               REGISTRATION NOTICE
  168.  
  169.             QQuery is not public domain or free software.  If you
  170.             continue using QQuery after a 30 day trial period, you
  171.             must register for a license to use QQuery.  A single
  172.             registration gives you royalty free unlimited runtime
  173.             rights for applications you develop that use QQuery.
  174.  
  175.             To register, send $10 (Ten dollars U.S.) directly to the
  176.             author:   (30 day unconditional money back guarantee)
  177.  
  178.                  Carlos Berguido         Telephone:
  179.                  1722 Capella Court      (707) 762-9067
  180.                  Petaluma, CA 94954
  181.  
  182.             Please include your name, address, and QQuery version
  183.             number.  You will receive the latest version of QQuery
  184.             INCLUDING ALL SOURCE CODE on a 5 1/4 inch diskette.
  185.  
  186.  
  187.           The source code is designed to make navigating QQuery as
  188.           comparable as possible whether it is run under FoxPro or FoxBASE+
  189.           except that the Enter key may also be used to exit the query
  190.           Browse when running under FoxPro only.
  191.  
  192.           If you have not installed QQuery, please read the last page of
  193.           this document regarding QQuery installation.
  194.  
  195.           The context sensitive Help system in the QQuery program is
  196.           intended to provide step by step instruction in the operation of
  197.           QQuery.  In addition, you are urged to experiment and seek other
  198.           sources of information in the science and art of creating and
  199.           combining logical expressions.
  200.  
  201.           FoxBASE+ and FoxPro are registered trademarks of FOX SOFTWARE,
  202.           INC.
  203.           05/19/90                Q Q U E R Y (tm)                   Page 2
  204.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  205.  
  206.                               - FEATURES AND BENEFITS -
  207.  
  208.           The information contained in this document is provided for system
  209.           developers and anyone interested in some of the technical ins and
  210.           outs of QQuery.
  211.  
  212.           FEATURE             BENEFIT
  213.  
  214.           Stores queries in   - Allows quick access to repeatedly used
  215.           a database.           queries.
  216.                               - Allows query creation and auditing by one
  217.                                 group and use by others.
  218.  
  219.           Each query has a    - Systemizes report headings.
  220.           name and a          - Makes it easy to locate and reuse queries.
  221.           description of up
  222.           to 55 characters.
  223.  
  224.           More than just SET  - QQuery will SET FILTER up to the 160
  225.           FILTER.               character limit on filter expressions. 
  226.                                 After exiting, the user can simply issue
  227.                                 commands and only those records that meet
  228.                                 the query condition will be included.
  229.                               - Also, at any time after exit with a query,
  230.                                 the user has access to memory variables for
  231.                                 the query name, description, and the up to
  232.                                 240 character condition itself for use in a
  233.                                 FOR phrase in commands such as COPY, INDEX,
  234.                                 LIST, and REPORT.
  235.                               - Program developers can call the QQuery
  236.                                 procedure from inside their procedure files
  237.                                 and take appropriate action in their
  238.                                 programs depending on what is returned is
  239.                                 the memory variables on QQuery's return.
  240.  
  241.           QQuery editor       - Allows flexibility in the way queries such
  242.           allows multiple       as "Guests who stay for 10 days or more"
  243.           field names and/or    are stated:
  244.           functions on both     DATEOUT-DATEIN is after or matches 10
  245.           sides of each         as well as:
  246.           equation.             DATEOUT is after or matches DATEIN+10
  247.  
  248.           QQuery editor uses  - User can see what options are available for
  249.           pop-up menus.         field names, functions, operators, nesting
  250.                                 parenthesis, and connectors.
  251.                               - Saves hundreds of keystrokes, saves time,
  252.                                 avoids misspellings.
  253.  
  254.           05/19/90                Q Q U E R Y (tm)                   Page 3
  255.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  256.  
  257.           FEATURE             BENEFIT
  258.  
  259.           Contains many of    - User can easily make a query insensitive to
  260.           the most popular      UPPER/lower case by choosing UPPER from a
  261.           functions on pop      pop-up menu: UPPER(CITY)='PERRYSBURG"
  262.           up menus.           - Make a query that ignores the last four
  263.                                 digits of a 9 digit zip code and enter
  264.                                 multiple random zips in one or more
  265.                                 condition lines:
  266.                                 LEFT(ZIP,5) is contained in "85718,85740"
  267.  
  268.           Field names pop up  - Makes it easy to locate the correct field
  269.           has sample data       name because the user can see a sample of
  270.           from user             the data.  Starting with version 2.10D, a
  271.           database.             field names pop up menu is available at the
  272.                                 touch of a key for every open work area.
  273.  
  274.           Self contained      - QQuery allows creating, listing, using,
  275.           system.               editing, renaming, deleting, and packing
  276.                                 queries, all from familiar Lotus 1-2-3
  277.                                 style menus.  Lotus and 1-2-3 are
  278.                                 registered trademarks of Lotus Development
  279.                                 Corporation.
  280.  
  281.           Context sensitive   - The user does not have to know about proper
  282.           auto-conversion of    syntax.  For example, if QQuery is
  283.           user expressions      expecting the user to enter a date
  284.           to correct syntax.    expression and the user just enters 1/1/89,
  285.                                 it will automatically be converted to
  286.                                 CTOD("1/1/89"), the correct syntax.  
  287.                               - QQuery searches the environment for field
  288.                                 names and variables to test each
  289.                                 constant/expression.  If the expression
  290.                                 tests ok, QQuery will accept it as entered. 
  291.                                 If the expression doesn't make sense,
  292.                                 QQuery will either put it in quotes, or
  293.                                 convert it with VAL or CTOD, depending on
  294.                                 whether a character, numeric, or date
  295.                                 expression is expected.
  296.  
  297.           Permits queries     - Point to field names of files in other work
  298.           into other work       areas in pop up menus whenever these fields
  299.           areas to related      in a related file are important to the
  300.           files.                query.  For example, to find all the
  301.                                 "Orders of $10,000 or more to Ohio
  302.                                 customers":
  303.                                 AMOUNT is after or matches 10000 .AND.
  304.                                 customer->STATE matches "OH"
  305.  
  306.  
  307.           05/19/90                Q Q U E R Y (tm)                   Page 4
  308.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  309.  
  310.                                - CAUTION: MULTI-USER -
  311.  
  312.           QQuery has never been tested in a multi-user environment.  There
  313.           are no LOAD, CALL, or RUN commands in QQuery to worry about. 
  314.           Nonetheless, no attempt was made to manage collisions that might
  315.           occur in a multi-user setting.  If you would like to see a multi-
  316.           user version of QQuery developed, please contact the author.  In
  317.           the meantime, please treat QQuery as you would any program that
  318.           has only been tested in a single user environment.
  319.  
  320.                        - ONE OPEN DATA FILE WORK AREA NEEDED -
  321.  
  322.           QQuery needs only one open work area and will find ANY unused
  323.           work area to USE for files it manages.  If all work areas are in
  324.           USE when the program is called, QQuery will advise you that such
  325.           is the case and return without executing.
  326.  
  327.  
  328.                             - QQUERY FILE DESCRIPTIONS -
  329.  
  330.           The following file is needed to run QQuery:
  331.  
  332.           FILENAME    STRUCTURE  CONTENTS
  333.           ----------  --------- ------------------------------------------ 
  334.           QQUERY.FOX     FOX    FoxBASE+ 2.10 compiled procedure file 
  335.                                        - OR -
  336.           QQUERY.FXP     FXP    FoxPro 1.02 compiled procedure file
  337.  
  338.           The following files are created by QQuery if they are not present
  339.           in the environment:
  340.  
  341.           FILENAME    STRUCTURE  CONTENTS
  342.           ----------  --------- ------------------------------------------ 
  343.           QQUERY.QST     DBF    Empty database structure used to make new
  344.                                 alias.QDB's
  345.           QQUERY.QSM     MEM    Memory variables for screen colors and 
  346.                                 feature options
  347.            alias.QDB     DBF    Database of queries for user data file
  348.                                 named <alias> 
  349.            alias.QDX     IDX    Index for above, key field is QDNAME 
  350.            alias.QDM     MEM    An image of the alias structures of all
  351.                                 open files with sample data
  352.           ??????         DBF    Occasionally a FOX generated unique
  353.                                 filename is used and subsequently erased,
  354.                                 function SYS(3).
  355.  
  356.           The 3 alias files are not actually named "alias".  "alias" is
  357.           used above to indicate that the left hand portion of the filename
  358.           is derived from the alias of your data file that has been USEd in
  359.           the current work area.
  360.  
  361.           05/19/90                Q Q U E R Y (tm)                   Page 5
  362.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  363.  
  364.                              - QQUERY FILES (continued) -
  365.  
  366.           The extension names QST, QSM, QDB, QDX, and QDM were chosen so
  367.           that QQuery would not conflict with your existing file names and
  368.           so you could identify the function of each QQuery file by name.
  369.  
  370.                         - HOW QQUERY CREATES AND USES FILES -
  371.  
  372.           Each time QQuery is started, it looks to see if a data file is in
  373.           USE in the currently selected work area.  If not, it presents a
  374.           directory of DBF files in the current directory and prompts you
  375.           to enter the name of one.  If none is entered, QQuery returns
  376.           without executing further.
  377.  
  378.           Once QQuery is given a file in the current work area, it checks
  379.           the current directory for a filename consisting of the alias as
  380.           the left hand part of the file name and QDB as the right hand
  381.           filename extension.
  382.  
  383.           For example, if ORDERS is the alias of the data file in the
  384.           current directory, QQuery will search for a file named
  385.           ORDERS.QDB.  If QQuery can't find the QDB file, it will create
  386.           one by copying the structure of the file QQUERY.QST to
  387.           ORDERS.QDB.  (If QQUERY.QST is not found in the current directory
  388.           or path, QQuery will create a new QQUERY.QST in the current
  389.           directory.)  The single ORDERS.QDB file can store hundreds of
  390.           queries to ORDERS and to any related files in unselected open
  391.           work areas.
  392.  
  393.                   - QDB & QDX FILES: QUERY DATA FILES AND INDEXES -
  394.  
  395.           In this example where ORDERS is the current work area alias,
  396.           QQuery requires two other files.  ORDERS.QDX is the index file
  397.           for ORDERS.QDB.  If the index file is not present, QQuery will
  398.           create one.
  399.  
  400.           alias.QDB Fields:
  401.           ----------------- 
  402.           QDNAME      C   8     The query name (and index key)
  403.  
  404.           QDESCRIPT   C  55     The plain language description of the query
  405.                                 (use for report headings)
  406.  
  407.           QDLEDIT     D   8     The last date edited (from the system date)
  408.  
  409.           QDCODE      C 254     The coded condition used by the query
  410.                                 editor 
  411.  
  412.           QDQUERY     C 240     The database language condition translated
  413.                                 from the code
  414.  
  415.           05/19/90                Q Q U E R Y (tm)                   Page 6
  416.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  417.  
  418.                        - QDM FILES: FIELD NAME POP UP MENUS -
  419.  
  420.           The third file in this example is ORDERS.QDM.  This memory file
  421.           is used for the pop up menus of field names and sample data from
  422.           the ORDERS data file.  
  423.  
  424.           Starting with version 2.10D of QQuery, field names and sample
  425.           data from every other work area that was in use when the QDM file
  426.           was created are also stored in this file.  QDM files are always
  427.           automatically created whenever there is no QDM in the current
  428.           directory or in a PATH that has the same name as the alias of the
  429.           data file currently selected.
  430.  
  431.           For example, if you have a data file alias ORDERS in use in the
  432.           current work area and are starting QQuery for the first time with
  433.           ORDERS, QQuery will create a memory file named ORDERS.QDM
  434.           containing a list of all the field specifications of ORDERS
  435.           (except memo fields) together with a portion of the data that is
  436.           in the current ORDERS record when you start QQuery.)  
  437.  
  438.           NOTE: To save disk space, when you have a group of several files
  439.           open in various work areas, make sure you select the master file
  440.           for that group every time before starting QQuery.  That way, only
  441.           one QDM file will ever be used for that group of files.
  442.  
  443.                    - MULTIPLE WORK AREA FIELD NAME POP UP MENUS -
  444.  
  445.           Starting with version 2.10D of QQuery, whenever you see the field
  446.           names pop up menu for the main file, you can also see additional
  447.           field name pop ups for all other work areas that were open when
  448.           the QDM file was created by using the left and right arrow keys.
  449.  
  450.           This feature of multiple work area field name pop up menus is
  451.           enabled in QQuery by having "/FLDPOP" in the QQSCOPTION variable
  452.           in the QQUERY.QSM system file.  This is the default when you
  453.           install version 2.10D.  The only reason not to enable this
  454.           feature is if you run out of memory and you don't want to
  455.           increase MVARSIZ in the CONFIG.FX or CONFIG.FP file.  The extra
  456.           pop-up lists require on average 45 bytes per field name.
  457.  
  458.           QDM files created by earlier versions of QQuery are completely
  459.           compatible with version 2.10D.  In fact, if you use your existing
  460.           QQUERY.QSM file that has QQSCOPTION="" with version 2.10D, QQuery
  461.           will generate a field name pop up for the main file only, just as
  462.           it did in earlier versions.  If you wish to add the other work
  463.           area pop up menus to an application that already has one or more
  464.           QDM files, first install version 2.10D of QQuery.  Delete the
  465.           existing QDM file.  Open up all the related files in all the work
  466.           areas you need and open the main file.  Start QQuery.  A new
  467.           <alias>.QDM with all the work area field names and sample data
  468.           will be created automatically.
  469.           05/19/90                Q Q U E R Y (tm)                   Page 7
  470.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  471.  
  472.           QQSCOPTION is a variable in the QQuery system memory file
  473.           QQUERY.QSM.  To enable field pop up menus for all open work
  474.           areas, have the QQSCOPTION variable include the string "/FLDPOP"
  475.           (quotes not needed).  That is the default when you install
  476.           version 2.10D.  To modify any existing QQUERY.QSM file:
  477.  
  478.                              RESTORE FROM QQUERY.QSM
  479.                              QQSCOPTION="/FLDPOP"
  480.                              SAVE TO QQUERY.QSM
  481.  
  482.           To save memory, if you do NOT want QQuery to create multiple work
  483.           area pop ups QDM files, substitute QQSCOPTION=""
  484.  
  485.  
  486.                   - EXCLUDING FILES FROM FIELD NAMES POP UP MENUS -
  487.  
  488.           You may not want to see field name pop ups for ALL the open work
  489.           areas, such as HELP and ERROR files.  QQSCOPTION can contain a
  490.           list of file aliases to exclude from the fields pop up menus. For
  491.           example, to include all files from all work areas EXCEPT a help
  492.           file and an error file, assuming the alias of each is HELP and
  493.           ERROR respectively, simply list the alias names separated by
  494.           commas after the /FLDPOP string in the QQSCOPTION variable:
  495.  
  496.                             QQSCOPTION="/FLDPOP:HELP,ERROR*"
  497.  
  498.           Don't forget the colon (:) after /FLDPOP and the asterisk (*)
  499.           after the last file name.  If you leave out the colon and the
  500.           asterisk, any listed files will NOT be excluded.
  501.  
  502.           If you want to change the Samples or if you change the Structure
  503.           of this data file, erase the file that begins with your data file
  504.           name and ends with the extension .QDM.  Then, the next time you
  505.           start QQuery, have your data files positioned at records that you
  506.           want to use for the pop up sample data.  Start QQuery and it will
  507.           create new field names pop up menus.  You may also use QQDMEDIT
  508.           described on the next page to modify existing QDM files.
  509.  
  510.           If you change field names or delete fields altogether, you will
  511.           have to adjust any query condition that uses the old field name. 
  512.           Each time you select a query from the LIST function, QQuery makes
  513.           a quick check to see if that all field names and variables in the
  514.           condition can still be found in the environment.  If not, you
  515.           will be offered the choice of editing the query to correct it or
  516.           going back to the top menu.  QQuery will not permit you to USE a
  517.           query that contains invalid statements.
  518.  
  519.  
  520.           05/19/90                Q Q U E R Y (tm)                   Page 8
  521.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  522.  
  523.                          - CUSTOM FIELD NAMES POP UP MENUS -
  524.  
  525.  
  526.           QQDMEDIT.PRG is a free utility program provided that lets you
  527.           customize existing field names pop up menus (QDM files):
  528.  
  529.             *    Modify the default field names pop up menu title.
  530.  
  531.             *    Change the content of any field name line.  Some users are
  532.                  replacing sample data with field descriptions.
  533.  
  534.             *    Add new lines.
  535.  
  536.             *    Delete existing lines.
  537.  
  538.             *    Add new children files and fields.
  539.  
  540.           Print the QQDMEDIT.PRG file for details, the following is an
  541.           overview.  
  542.  
  543.           Anytime after QQuery creates a QDM file, you make change it by
  544.           entering:
  545.  
  546.                                  DO QQDMEDIT
  547.  
  548.           at either the FoxBASE+ dot prompt or in the FoxPro command
  549.           window.  
  550.  
  551.           You will see a list of any existing QDM files in the current
  552.           directory.  Enter the name of the QDM file you want to modify. 
  553.           The QDM file will be automatically converted to a text file and
  554.           presented to you for full screen editing using the built in
  555.           FoxBASE+ or FoxPro editor.  
  556.  
  557.           After making changes, save the changes with the Ctrl-W key or
  558.           abandon any changes with the Escape key.  The field names
  559.           information will be automatically converted back to QDM format,
  560.           ready to use with QQuery.
  561.  
  562.  
  563.           05/19/90                Q Q U E R Y (tm)                   Page 9
  564.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  565.  
  566.                                - MEMORY REQUIREMENTS -
  567.  
  568.           Use the information in this section only if you are getting the
  569.           Fox error message number 21:
  570.  
  571.                        "String memory variable area overflow"
  572.  
  573.           when you run QQuery with your biggest combination of data files.
  574.  
  575.           QQuery uses lots of memory variable space for pop up menus.  As a
  576.           result, you may run out of room in memory when running QQuery
  577.           with the Fox default memory variable size of 6,000 bytes.
  578.  
  579.           QQuery and Fox could start to run out of memory if you have many
  580.           field name pop up menus with many fields, all available at once. 
  581.           Each menu item varies in memory requirement depending on the
  582.           field type and contents.  In practice, I have measured an average
  583.           of 45 bytes per field name pop up item.  To allow a margin for
  584.           error, use 50 bytes per menu item.
  585.  
  586.           Fox uses an item named MVARSIZ in a CONFIG file to permit you to
  587.           increase the amount of memory allocted to variables.  (CONFIG.FX
  588.           for FoxBASE+, CONFIG.FP for Foxpro).  
  589.  
  590.           If you get the "String memory variable area overflow" error
  591.           message, try increasing MVARSIZ in the CONFIG file by 50 bytes
  592.           for each field over 25 plus whatever you need in any program that
  593.           calls QQuery.  For example, if your related data files have
  594.           between them 145 fields, increase memory by (145-25)*50=6000
  595.           bytes.
  596.  
  597.           If you need to change the memory allocation, see the INSTALLATION
  598.           section at the end of this document about changing the CONFIG
  599.           file.  You will want to be sure it contains:
  600.  
  601.                                 MVARSIZ=n
  602.  
  603.           where n is any number greater than the Fox default of 6.  Each
  604.           increment represents 1,000 bytes, so MVARSIZ=12 would give you
  605.           12,000 bytes for memory variables.
  606.  
  607.  
  608.           05/19/90                Q Q U E R Y (tm)                  Page 10
  609.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  610.  
  611.                             - QQUERY MEMORY VARIABLES - 
  612.  
  613.           QQuery does NOT require the use of PARAMETERS.  This was done so
  614.           that QQuery would be easy to use from the dot prompt.  The
  615.           following memory variables are PUBLIC on return from QQuery:
  616.  
  617.             QQNAME       C      The query nickname, trimmed
  618.             QQDESC       C      The user description, trimmed 
  619.             QQUERY       C      up to 240 characters for the condition used
  620.                                 by calling program for subsequent SET
  621.                                 FILTER TO, FOR, or WHILE phrases, trimmed
  622.  
  623.           These strings will return as nuls if the user QUITs so that any
  624.           program you DO QQuery from can take appropriate action. If you
  625.           are a developer with a few lines of code you can spare, you might
  626.           try these lines in your programs after DO QQUERY
  627.  
  628.           To combine the name and description for reports:
  629.  
  630.              QQDESC=QQNAME+' - '+QQDESC
  631.  
  632.           To test for especially long conditions:
  633.  
  634.              IF LEN(QQUERY)>210        && between 210 and 240, BIG
  635.                 COPY TO T FOR &QQUERY
  636.                 USE T ALIAS <your data file name> 
  637.              ENDIF 
  638.              ... do report expecting an ALIAS of <your data file name> 
  639.              USE 
  640.              DELETE FILE T.DBF
  641.  
  642.           If the condition is 240 characters, the COPY TO T FOR &QQUERY
  643.           command will expand to the maximum 254 characters allowed in a
  644.           FoxBASE+ command line.  (NOTE: FoxPro increases the limit to 1024
  645.           characters per command line)
  646.  
  647.           SET FILTER TO has a limit of 160 characters.  That doesn't mean
  648.           that queries need be limited to that length.  A command that
  649.           combines sorting and filtering in one step is:
  650.  
  651.              INDEX ON <your sorting expression> TO <filename> FOR &QQUERY
  652.  
  653.           Make sure you test the LENgth of the QQUERY memory variable
  654.           before issuing commands in your programs.  Remember the limit of
  655.           254 characters in any command line means AFTER macro expansion. 
  656.           If the condition is too big for one method, you can always resort
  657.           to copying to a temporary file as in the above IF ENDIF example. 
  658.           Be flexible!
  659.  
  660.           05/19/90                Q Q U E R Y (tm)                  Page 11
  661.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  662.  
  663.                              - CHANGING SCREEN COLORS -
  664.  
  665.           There is a wide range of color monitors out in the world, and
  666.           what is bright yellow on one monitor is dark brown on another. 
  667.           This section is about changing screen colors from the default
  668.           values of QQuery to something more to your liking.
  669.  
  670.           QQuery will create a memory file QQUERY.QSM if it is not present
  671.           in the environment with the following default values for screen
  672.           colors.
  673.  
  674.           QQUERY.QSM DEFAULT SCREEN COLORS MEMORY VARIABLES:
  675.  
  676.            Mono  normal               . QQSCRNNRML="W/N,N/W,N"
  677.                  editor fields        . QQSCRNBOLD="W+/N" 
  678.                  blinking messages    . QQSCRNBLNK="W+*/N,X" 
  679.                  help border          . QQSCRNHLPB="N/W"
  680.                  help text            . QQSCRNHLPT="W/B,N/W" 
  681.            Color normal               . QQSCOLNRML="W/B,W/R,B" 
  682.                  editor fields        . QQSCOLBOLD="W+/B" 
  683.                  blinking messages    . QQSCOLBLNK="W*/B,B/B" 
  684.                  help border          . QQSCOLHLPB="N/W" 
  685.                  help text            . QQSCOLHLPT="N/G,N/W" 
  686.            Options                    . QQSCOPTION="/FLDPOP"
  687.  
  688.           Whenever QQuery is started with this file present, QQuery will
  689.           use the values for screen colors that are in the file.  This
  690.           means you can substitute different values for screen colors and
  691.           QQuery will use them.  See the FIELD NAMES POP UP MENUS section
  692.           of this documentation for info about the QQSCOPTION variable.
  693.  
  694.           On a color monitor, the default color for normal display in
  695.           QQuery is determined by the variable QQSCOLNRML, which by default
  696.           is:
  697.  
  698.           "          W/B            ,          W/R          ,        B    "
  699.  
  700.           Normal text: white on blue, Enhanced: white on red,  Border: blue
  701.  
  702.           The abbreviations for all the colors are listed under the SET
  703.           COLOR TO command in your database manual of Commands and
  704.           Functions.  You can get ideas for potential color combinations by
  705.           using the SCREEN options in the full screen SET command.  Just
  706.           enter SET at the dot prompt.
  707.  
  708.  
  709.           05/19/90                Q Q U E R Y (tm)                  Page 12
  710.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  711.  
  712.                        - CHANGING SCREEN COLORS (continued) -
  713.  
  714.           If you want to change any of the colors in QQUERY, you need to
  715.           change the contents of QQUERY.QSM.  At the dot prompt, enter:
  716.  
  717.                   . RESTORE FROM QQUERY.QSM 
  718.                   . DISPLAY MEMORY
  719.  
  720.           At this point you should see a list like this:
  721.  
  722.                   QQSCRNNRML  Pub   C  "W/N,N/W,N"
  723.                   QQSCRNBOLD  Pub   C  "W+/N"
  724.                   QQSCRNBLNK  Pub   C  "W+*/N,X"
  725.                   QQSCRNHLPB  Pub   C  "N/W"
  726.                   QQSCRNHLPT  Pub   C  "W/B,N/W"
  727.                   QQSCOLNRML  Pub   C  "W/B,W/R,B"
  728.                   QQSCOLBOLD  Pub   C  "W+/B"
  729.                   QQSCOLBLNK  Pub   C  "W*/B,B/B"
  730.                   QQSCOLHLPB  Pub   C  "N/W" 
  731.                   QQSCOLHLPT  Pub   C  "N/G,N/W" 
  732.                   QQSCOPTION  Pub   C  "/FLDPOP" 
  733.                      11 variables defined,      138 bytes used 
  734.                     245 variables available,   5862 bytes available
  735.  
  736.           Then, to change to:       Normal text: blue on cyan, 
  737.                                        Enhanced: black on white,           
  738.                                          Border: cyan
  739.  
  740.                        Enter:
  741.  
  742.                   . QQSCOLNRML="B/BG,N/W,BG"
  743.  
  744.           Finally, save your changes to disk.
  745.  
  746.                   . SAVE TO QQUERY.QSM
  747.  
  748.           By the way, if your new colors get way out of hand and you want
  749.           to start over, just erase the QQUERY.QSM file from the disk. 
  750.           QQuery will create a new QQUERY.QSM with the default colors the
  751.           next time you start QQuery.
  752.  
  753.  
  754.           05/19/90                Q Q U E R Y (tm)                  Page 13
  755.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  756.  
  757.                                  - PROCEDURE FILES -
  758.  
  759.           QQuery is a PROCEDURE file consisting of 21 PRG files bound by
  760.           FOXBIND and compiled encrypted by FOXPCOMP.  QQuery is useful at
  761.           the dot prompt.  However, the intended use of QQuery is as a
  762.           subroutine in the reporting sections of large database
  763.           application procedure files.
  764.  
  765.           For example, in the middle of a reporting program, you will DO
  766.           QQuery after choosing the report needed and before running it. 
  767.           You can do that with QQuery, even if the calling program is a
  768.           procedure in an open procedure file.  However, QQUERY NEEDS YOU
  769.           TO SUPPLY IT WITH THE NAME OF THE PROCEDURE FILE THAT CALLS
  770.           QQUERY.  If you do not, QQuery will not re-open your procedure
  771.           file when it is ready to return and your program will stop.
  772.  
  773.           So, before you call QQuery, create a memory variable QCALLER with
  774.           the name of the procedure file that will be calling QQuery. 
  775.           Please note that the FoxBASE+ SYS(16) function returns the name
  776.           of the current program or module, not necessarily the name of the
  777.           procedure file containing the program or module.  
  778.  
  779.           As an example, if you have a procedure file named MAIN.PRG that
  780.           will be DOing QQuery, the following is recommended at the
  781.           beginning of the procedure file MAIN.PRG:
  782.  
  783.                  SET PROCEDURE TO MAIN
  784.                  QCALLER='MAIN'
  785.                  DO ......         && the name of your top procedure
  786.                  PROCEDURE ......  && the name of your first procedure
  787.  
  788.           For your information, the following are the first few lines of
  789.           code in QQuery, at the beginning, before the first procedure:
  790.  
  791.           SET ECHO OFF
  792.           RELEASE qqname,qqdesc,qquery
  793.           PRIVATE ALL LIKE qq*
  794.           PUBLIC qqname,qqdesc,qquery
  795.           SET CONSOLE OFF
  796.           qqtalk=SYS(2001,'TALK')    && save environmental SETs
  797.           SET TALK OFF
  798.           SET CONSOLE ON
  799.           qqesca=SYS(2001,'ESCAPE')  && more SETs saved later
  800.           SET ESCAPE OFF
  801.           IF TYPE('qcaller')='U'     && if undefined
  802.              qcaller=''
  803.           ENDIF
  804.           SET PROCEDURE TO qquery
  805.           DO qqstart                 && QQuery's top procedure
  806.           SET PROCEDURE TO &qcaller
  807.           RETURN                && to calling procedure, PRG, or dot prompt
  808.           05/19/90                Q Q U E R Y (tm)                  Page 14
  809.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  810.  
  811.                                 - READ ONLY ACCESS -
  812.  
  813.           For quality control reasons, you may want one user to create and
  814.           modify all queries using QQuery and all other users to have "READ
  815.           ONLY" access to the query files for generating reports.  Source
  816.           code for a program for query read only, QQREAD.PRG, is included
  817.           on the QQuery distribution diskette, ready for you to customize.
  818.  
  819.           To enhance QQREAD.PRG, use your own error trapping routines to
  820.           provide tests for the existence of file <alias>.QDB, index file
  821.           <alias>.QDX, that there is at least 1 undeleted record in the
  822.           file, and that there is at least one unused work area available. 
  823.           Have the <alias> user data file (not the query data file) open in
  824.           the currently selected work area, and be sure that DELETED is SET
  825.           ON.  You may also wish to add Help screens.
  826.  
  827.           QQREAD.PRG is small enough to be bound with your other programs
  828.           in your main procedure file.
  829.  
  830.  
  831.           NOTES:
  832.  
  833.           05/19/90                Q Q U E R Y (tm)                  Page 15
  834.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  835.  
  836.                        - NOTICE REGARDING QQUERY SOURCE CODE -
  837.  
  838.           QQuery is a copyrighted work by Carlos Berguido.  When you
  839.           register you are granted the right to modify the QQuery source
  840.           code to optimize QQuery for your applications.
  841.  
  842.           As a registered user, you may choose to modify the source code to
  843.           eliminate display on the screen of the copyright notice and/or
  844.           the registration notice in applications you develop that use
  845.           QQuery.  You are granted that right as a registered user. 
  846.           However, you are NOT granted the right to delete either notice
  847.           from the source code.  You may write around the notices or
  848.           comment them out so that they do not display but you may not
  849.           erase either notice from the source code.
  850.  
  851.           Any copies of QQuery source code that you provide with your
  852.           applications must contain the QQNOTICE.PRG module, and the
  853.           copyright notice in the QQSTART.PRG module without any
  854.           alterations to the content of any notice.  Failure to provide
  855.           these notices with the source code is a violation of the author's
  856.           copyright.  Thank-you for your cooperation.
  857.  
  858.           ANY USE OF QQUERY OTHER THAN FROM WITHIN THE APPLICATION PROGRAMS
  859.           OF REGISTERED USERS REQUIRES REGISTRATION.
  860.  
  861.  
  862.  
  863.           05/19/90                Q Q U E R Y (tm)                  Page 16
  864.               (c) 1989,1990 by Carlos Berguido - Vers 2.10D INFORMATION
  865.  
  866.                                   - INSTALLATION -
  867.  
  868.           These instructions assume that if you received QQuery in a one
  869.           compressed "ZIP" file, that you have extracted the QQuery files
  870.           onto a floppy diskette.  Please choose one of these options:
  871.  
  872.           OPTION 1 - QQuery and your data files in the same directory:
  873.  
  874.           Insert the QQuery diskette in drive A.  In this option, the
  875.           QQuery program and all supporting files are installed in the same
  876.           directory as your data files.  If, for example, you keep your
  877.           data in a subdirectory C:\FOX\MYDATA, get to DOS and enter:
  878.                                      C:
  879.                                      CD \FOX\MYDATA
  880.                                      A:INSTALL
  881.  
  882.           The three QQuery system files QQUERY.*, the README file, and the
  883.           six QQDEMO.* files will be copied into your data directory.  When
  884.           you are at the place to enter Fox commands working with your data
  885.           files, you can start QQuery by entering either:
  886.                                      DO QQUERY      && QQuery directly
  887.                                      DO QQDEMO      && The demonstration
  888.  
  889.           OPTION 2 - Run QQuery from any directory by using PATH:
  890.  
  891.           If you have more than one data subdirectory, and you want to run
  892.           QQuery with the data in any of them, you can repeat the
  893.           installation described above for each directory.  However, if you
  894.           would like to save disk space and make it easier to upgrade
  895.           QQuery, you should install QQuery in only one place.  In this
  896.           example, QQuery will be installed in a subdirectory below the
  897.           standard Fox subdirectory (change \FOX to \FOXPRO below if that
  898.           is where you keep FoxPro):
  899.                                      C:
  900.                                      MD \FOX\QQUERY
  901.                                      CD \FOX\QQUERY
  902.                                      A:INSTALL
  903.  
  904.           A subdirectory C:\FOX\QQUERY will be created on your hard disk
  905.           and the QQuery files will be copied into it.  Now, each time you
  906.           start Fox, Fox needs to know where QQuery exists on your hard
  907.           disk.  Use MODIFY COMMAND or any text editor to create or modify
  908.           the \FOX\CONFIG.FX (FoxPro uses CONFIG.FP) file and add the line:
  909.  
  910.                                      PATH = C:\FOX\QQUERY
  911.  
  912.           However, if there is already a PATH statement, just add
  913.           ;C:\FOX\QQUERY to the end of the existing PATH statement.  See
  914.           "Fine Tuning" and the SET PATH TO command in the Fox User Guide
  915.           for more information.  After doing that, restart Fox.  To use
  916.           QQuery, enter either DO QQDEMO or DO QQUERY at the dot prompt or
  917.           use DO QQUERY in your application programs.
  918.